<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="三包申请" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addApply()"
                        ng-disabled="!btnPermission.guaranteesApplyAdd"
                        title="{{!btnPermission.guaranteesApplyAdd?'无权限执行此操作':''}}">新增</button>
                    <button class="btn btn-operate" ng-click="batchDel()"
                        ng-disabled="!btnPermission.guaranteesApplyDel"
                        title="{{!btnPermission.guaranteesApplyDel?'无权限执行此操作':''}}">批量删除</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                            ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color" ng-if="!!btnPermission.guaranteesApplyExport">
                            <div title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl"
                                    download-param="exportParam.sectionParam" download-key="ids">
                                    <i class="yb-icon ico-export-o"></i> 导出
                                </li>
                                <li yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> 导出全部
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs"
                        ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="申请单号"
                        ng-model="condition.purchaseNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">申请单号：</label>
                        <textarea ng-model="condition.billNos" class="form-control" placeholder="逗号分隔或者换行分隔"></textarea>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">客户名称：</label>
                        <textarea ng-model="condition.purchaseNames" class="form-control"
                            placeholder="逗号分隔或者换行分隔"></textarea>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">零件号:</label>
                        <textarea ng-model="condition.materialsNos" class="form-control" placeholder="逗号分隔或者换行分隔"></textarea>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">调度员：</label>
                        <input type="text" ng-model="condition.dispatcherName" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">申请人：</label>
                        <input type="text" ng-model="condition.applicationName" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">CRM单号：</label>
                        <input type="text" name="crmOrder" class="form-control" ng-model="condition.crmOrder">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">备件申请说明：</label>
                        <input type="text" name="crmNote" class="form-control" ng-model="condition.crmNote">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">备注：</label>
                        <input type="text" name="note" class="form-control" ng-model="condition.note">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">状态：</label>
                        <select class="form-control" ng-model="condition.guaraenteesStatus"
                            ng-options="item.code as item.name for item in billStateList">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">出库状态：</label>
                        <select class="form-control" ng-model="condition.status">
                            <option value="">请选择</option>
                            <option value="0">未出库</option>
                            <option value="1">部分出库</option>
                            <option value="2">已出库</option>
                            <option value="3">强制结单</option>
                        </select>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">申请时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.createDateStart"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showDatepickerBegin = !showDatepickerBegin"
                            ng-change="checkDate(condition, 'createDateStart', 'createDateEnd')"
                            is-open="showDatepickerBegin" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.createDateEnd"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showDatepickerEnd = !showDatepickerEnd"
                            ng-change="checkDate(condition, 'createDateStart', 'createDateEnd')"
                            is-open="showDatepickerEnd" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group m-b-sm clearfix" ng-if="!!isNJ">
                      <label class="col-xs-4 control-label"><span translate>服务类型</span>：</label>
                      <div class="col-xs-8 wrapper-none service-type">
                          <div dealer-dictionary-selector ng-model="condition.serviceType" sel-key="Service_Type">
                              <input type="text" class="form-control light-bg" ng-model="condition.serviceType" translate translate-attr-placeholder="请选择" readonly yb-focus>
                          </div>
                      </div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">服务人员：</label>
                        <input type="text" class="form-control" ng-model="condition.serviceName">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">服务网点：</label>
                        <input type="text" class="form-control" ng-model="condition.serviceSite">
                    </div>
                    <!-- xbt -->
                    <div class="form-group clearfix">
                        <label class="control-label">服务信息单号：</label>
                        <input type="text" class="form-control" ng-model="condition.serviceNo">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">是否返厂：</label>
                        <select class="form-control" ng-model="condition.isReturn">
                            <option value="">请选择</option>
                            <option value="是">是</option>
                            <option value="否">否</option>
                        </select>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">发运时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.deliveryReceiptStart"
                            datepicker-popup="{{'yyyy-MM-dd'}}"
                            ng-click="showDatedeliveryReceiptStart = !showDatedeliveryReceiptStart"
                            ng-change="checkDate(condition, 'deliveryReceiptStart', 'deliveryReceiptEnd')"
                            is-open="showDatedeliveryReceiptStart" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.deliveryReceiptEnd"
                            datepicker-popup="{{'yyyy-MM-dd'}}"
                            ng-click="showDatedeliveryReceiptEnd = !showDatedeliveryReceiptEnd"
                            ng-change="checkDate(condition, 'deliveryReceiptStart', 'deliveryReceiptEnd')"
                            is-open="showDatedeliveryReceiptEnd" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">序列号：</label>
                        <input type="text" class="form-control" ng-model="condition.factoryNumber">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">发运方式：</label>
                        <select class="form-control" ng-model="condition.deliveryTypeId" >
                            <option value="" translate>请选择运输方式</option>
                            <option ng-repeat="item in sendMethodList" value="{{item.code}}" > {{item.name}}</option>
                        </select>
                    </div>
                    <!-- xbt -->
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="markInfo.allCheckedBill"
                                            yb-click="selectAll(dataList, 'Bill')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
                                            fixed-width="tbStyle.billFixedWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingle(item, dataList, 'Bill')"></div>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span
                                            ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="auditApply(item)"
                                                ng-disabled="item.guaraenteesStatus != '1' || !btnPermission.guaranteesApplyAudit"
                                                title="{{!btnPermission.guaranteesApplyAudit?'无权限执行此操作':''}}">审核</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="editApply(item)"
                                                ng-disabled="item.guaraenteesStatus != '0' && item.guaraenteesStatus != '3' || !btnPermission.guaranteesApplyEdit"
                                                title="{{!btnPermission.guaranteesApplyEdit?'无权限执行此操作':''}}">编辑</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="adjustApply(item)"
                                                ng-disabled="item.guaraenteesStatus != '2' || !btnPermission.guaranteesApplyAdjust"
                                                title="{{!btnPermission.guaranteesApplyAdjust?'无权限执行此操作':''}}">调整</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="revertApply(item)"
                                                ng-disabled="(item.guaraenteesStatus != '2' && item.guaraenteesStatus != '1') || !!item.outBillNos[0] || !btnPermission.guaranteesApplyRevert"
                                                title="{{!btnPermission.guaranteesApplyRevert ?'无权限执行此操作':''}}">撤回</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="delApply(item.id)"
                                                ng-disabled="item.outEnable == 2 || !btnPermission.guaranteesApplyDel"
                                                title="{{!btnPermission.guaranteesApplyDel?'无权限执行此操作':''}}">删除</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                    ng-click="batchImport(item.id)"
                                                    ng-disabled="item.sourceType != 1 || !btnPermission.batchImport"
                                                    title="{{!btnPermission.batchImport?'无权限执行此操作':''}}">导入批次号</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="auditApply(item,'ld')"
                                                ng-disabled="!item.guaraenteesStatus == 2 || item.leaderAuditStatus == 1 || item.leaderAuditStatus == null"
                                                ng-if="isNY  || isJCH"
                                                >部门领导审核</button>     
                                                
      
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span
                                            ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="auditApply(item)"
                                                ng-disabled="item.guaraenteesStatus != '1' || !btnPermission.guaranteesApplyAudit"
                                                title="{{!btnPermission.guaranteesApplyAudit?'无权限执行此操作':''}}">审核</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="editApply(item)"
                                                ng-disabled="item.guaraenteesStatus != '0' && item.guaraenteesStatus != '3' || !btnPermission.guaranteesApplyEdit"
                                                title="{{!btnPermission.guaranteesApplyEdit?'无权限执行此操作':''}}">编辑</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="delApply(item.id)"
                                                ng-disabled="item.outEnable == 2 || !btnPermission.guaranteesApplyDel"
                                                title="{{!btnPermission.guaranteesApplyDel?'无权限执行此操作':''}}">删除</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allCheckedBill" yb-check-name="全选"
                    yb-click="selectAll(dataList, 'Bill')"></div>
                <button class="btn btn-operate" ng-click="batchDel()" ng-disabled="!btnPermission.guaranteesApplyDel"
                    title="{{!btnPermission.guaranteesApplyDel?'无权限执行此操作':''}}">删除</button>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="审核" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.purchaseNo||'-'}}">
                        {{orderObj.headerInfo.purchaseNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">接收单位：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.purchaseNo||'-'}}">
                        {{orderObj.headerInfo.supplierOrgName||'-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请日期：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(orderObj.headerInfo.applicationDate|YbDate:'yyyy-MM-dd HH:mm:ss')||'-'}}">
                        {{(orderObj.headerInfo.applicationDate|YbDate:'yyyy-MM-dd HH:mm:ss') || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.applicationName ||'-'}}">
                        {{orderObj.headerInfo.applicationName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请人电话：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{orderObj.headerInfo.applicationPhone ||'-'}}">
                        {{orderObj.headerInfo.applicationPhone || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">客户名称：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.customerName||'-'}}">
                        {{orderObj.headerInfo.customerName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">调度员：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.dispatcherName||'-'}}">
                        {{orderObj.headerInfo.dispatcherName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">SAP内部订单：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.sapName || '-'}}">
                        {{orderObj.headerInfo.sapName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">移动类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.sapTypeName || '-'}}">
                        {{orderObj.headerInfo.sapTypeName}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">发货方式：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.deliveryTypeName||'-'}}">
                        {{orderObj.headerInfo.deliveryTypeName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">结算方式：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.settleTypeName||'-'}}">
                        {{orderObj.headerInfo.settleTypeName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">三包类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{orderObj.headerInfo.guaranteesTypeName||'-'}}">
                        {{orderObj.headerInfo.guaranteesTypeName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">收货人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.receiverName||'-'}}">
                        {{orderObj.headerInfo.receiverName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">手机号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.receiverPhone||'-'}}">
                        {{orderObj.headerInfo.receiverPhone || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">收货地址：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.receiverAddress||'-'}}">
                        {{orderObj.headerInfo.receiverAddress || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">传真：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.receiverFax||'-'}}">
                        {{orderObj.headerInfo.receiverFax || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.note||'-'}}">
                        {{orderObj.headerInfo.note || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">国家和地区：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.country||'-'}}">
                        {{orderObj.headerInfo.country || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="!!isNJ">
                    <label class="col-xs-4 m-b-n text-right max-w-100">服务类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.serviceType||'-'}}">
                        {{orderObj.headerInfo.serviceType || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                  <label class="col-xs-4 m-b-n text-right max-w-100">服务人员电话：</label>
                  <div class="col-xs-8 wrapper-none spill-dots"
                      title="{{orderObj.headerInfo.servicePhone ||'-'}}">
                      {{orderObj.headerInfo.servicePhone || "-"}}
                  </div>
              </div>
              <div class="form-group col-xs-3 m-b-sm" ng-if="!!isNJ">
                <label class="col-xs-4 m-b-n text-right max-w-100">预计发货时间：</label>
                <div class="col-xs-8 wrapper-none spill-dots"
                     title="{{orderObj.headerInfo.planDeliveryReceiptTime||'-'}}">
                    {{(orderObj.headerInfo.planDeliveryReceiptTime|YbDate:'yyyy-MM-dd HH:mm:ss')|| "-"}}
                </div>
            </div>

            <div class="form-group col-xs-3 m-b-sm" ng-if="isXF">
                <label class="col-xs-4 m-b-n text-right max-w-100">CRM发货单号：</label>
                <div class="col-xs-8 wrapper-none spill-dots"
                     title="{{orderObj.headerInfo.crmDeliveryNo ||'-'}}">
                    {{orderObj.headerInfo.crmDeliveryNo || "-"}}
                </div>
            </div>
            </div>
            <div class="panel-bar pos-a clearfix" style="left:0;right: 240px;">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="panel-bar pos-a clearfix" style="right: 0; width: 225px;">
                <div class="pull-left">
                    <i></i>审核意见
                </div>
            </div>
            <div class="main-area d-b-60" style="top:250px; right: 240px;">
                <div yb-table-fixed class="table-fixed-wrap" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{materielTableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="{'left':materielTableConfig.fixedWidth+'px'}">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="orderObj.detailList.length > 0">
                        <table class="table-fixed border-none" width="{{materielTableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in orderObj.detailList track by $index">
                                    <td class="spill-dots" ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.detailList.length > 0" ng-style="{'left':materielTableConfig.fixedWidth+'px'}">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in orderObj.detailList track by $index">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in materielTableConfig.tableCol track by $index" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.detailList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="main-area d-b-60" style="top:250px; left: auto; width: 225px;">
                <div class="main-wrap p-b-lg over-flow-h">
                    <textarea yb-word-count max-size="100" name="auditNote" class="form-control full"
                        ng-model="orderObj.headerInfo.auditNote"
                        ng-class="{'error': !orderObj.headerInfo.auditNote && submitted}" placeholder="审核意见"></textarea>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm"
                    ng-click="auditPurchase('pass', orderObj.headerInfo.id, orderObj.headerInfo.auditNote)">通过</button>
                <button type="button" class="btn btn-primary m-r-sm"
                    ng-click="auditPurchase('refuse', orderObj.headerInfo.id, orderObj.headerInfo.auditNote)">拒绝</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[2]" ng-if="activeFlag[2]">
            <form name="orderForm" class="m-t-sm form-horizontal form-up-tb border-b clearfix" novalidate>
                <div class="form-group col-xs-3 m-b-sm" ng-if="!!orderObj.headerInfo.purchaseNo">
                    <label class="col-xs-4 control-label max-w-100">申请单号：</label>
                    <div class="col-xs-8 control-label p-l-n text-left spill-dots"
                        title="{{orderObj.headerInfo.purchaseNo}}">
                        {{orderObj.headerInfo.purchaseNo}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">接收单位：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.supplierOrgName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">申请日期：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.applicationDate|YbDate}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">申请人：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.applicationName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">申请人电话：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="createPhone" class="form-control"
                            ng-model="orderObj.headerInfo.applicationPhone" maxlength="11">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.type === 1 || isJCH">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>客户名称：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="customerName" class="form-control light-bg"
                            ng-model="orderObj.headerInfo.customerName"
                            ng-click="selectDealer()" required yb-focus readonly placeholder="请选择">

                        <div class="msg-block"
                            ng-if="orderForm.customerName.$dirty || (orderForm.customerName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.customerName.$error.required && !orderForm.customerName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.type === 2 && !isJCH">
                    <label class="col-xs-4 control-label max-w-100">客户名称：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.customerName || "-"}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>调度员：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="dispatcherName" class="form-control light-bg"
                            ng-model="orderObj.headerInfo.dispatcherName" ng-click="selectDispatch()" required yb-focus
                            readonly placeholder="请选择">

                        <div class="msg-block"
                            ng-if="orderForm.dispatcherName.$dirty || (orderForm.dispatcherName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.dispatcherName.$error.required && !orderForm.dispatcherName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>SAP内部订单：</label>
                    <div class="col-xs-8 wrapper-none">
                        <!-- <div dictionary-selector sel-code="orderObj.headerInfo.sapId"
                            ng-model="orderObj.headerInfo.sapName" sel-key="SBNBDD">
                            <input type="text" name="sapName" class="form-control light-bg"
                                ng-model="orderObj.headerInfo.sapName" placeholder="请选择" required readonly>
                            <input type="hidden" name="sapId" class="form-control light-bg"
                                ng-model="orderObj.headerInfo.sapId">
                        </div> -->

                        <input type="text" name="sapName" class="form-control light-bg"
                            ng-model="orderObj.headerInfo.sapName" ng-click="selectSapName()" required yb-focus
                            readonly placeholder="请选择">

                        <div class="msg-block"
                            ng-show="orderForm.sapName.$dirty || (orderForm.sapName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.sapName.$error.required && !orderForm.sapName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>移动类型：</label>
                    <!-- <div class="col-xs-8 wrapper-none">
                        <input type="text" name="sapTypeName" class="form-control light-bg" maxlength="20"
                            ng-model="orderObj.headerInfo.sapTypeName" required yb-focus>

                        <div class="msg-block"
                            ng-if="orderForm.sapTypeName.$dirty || (orderForm.sapTypeName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.sapTypeName.$error.required && !orderForm.sapTypeName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div> -->

                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector ng-model="orderObj.headerInfo.sapTypeName" sel-key="MOVETYPE">
                            <input type="text" name="sapTypeName" class="form-control light-bg"
                                ng-model="orderObj.headerInfo.sapTypeName" placeholder="请选择" required readonly yb-focus>
                        </div>
                        <div class="msg-block"
                            ng-show="orderForm.sapTypeName.$dirty || (orderForm.sapTypeName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.sapTypeName.$error.required && !orderForm.sapTypeName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>发运方式：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div select-send-type first-level-model="orderObj.headerInfo.deliveryTypeId"
                            second-level-model="orderObj.headerInfo.sendTypeChildId"
                            parent-type-name="orderObj.headerInfo.deliveryTypeName"
                            child-type-name="orderObj.headerInfo.sendTypeChildName"></div>
                        <div class="msg-block"
                            ng-if="orderForm.sendType.$dirty || (orderForm.sendType.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.sendType.$error.required && !orderForm.sendType.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>结算方式：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector ng-model="orderObj.headerInfo.settleTypeName" sel-key="JSFS">
                            <input type="text" name="settleTypeName" class="form-control light-bg"
                                ng-model="orderObj.headerInfo.settleTypeName" placeholder="请选择" required readonly
                                yb-focus>
                        </div>
                        <div class="msg-block"
                            ng-show="orderForm.settleTypeName.$dirty || (orderForm.settleTypeName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.settleTypeName.$error.required && !orderForm.settleTypeName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>三包类型：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector ng-model="orderObj.headerInfo.guaranteesTypeName" sel-key="SBLX">
                            <input type="text" name="guaranteesTypeName" class="form-control light-bg"
                                ng-model="orderObj.headerInfo.guaranteesTypeName" placeholder="请选择" required readonly
                                yb-focus>
                        </div>
                        <div class="msg-block"
                            ng-show="orderForm.guaranteesTypeName.$dirty || (orderForm.guaranteesTypeName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.guaranteesTypeName.$error.required && !orderForm.guaranteesTypeName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>收货人：</label>
                    <div class="col-xs-6 wrapper-none">
                        <input type="text" name="receiverName" class="form-control"
                            ng-model="orderObj.headerInfo.receiverName" required yb-focus maxlength="11">

                        <div class="msg-block"
                            ng-show="orderForm.receiverName.$dirty || (orderForm.receiverName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.receiverName.$error.required && !orderForm.receiverName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-2 p-l-sm p-r-none control-btn">
                        <button class="btn btn-default form-control" type="button"
                            ng-click="searchAddress(orderObj.headerInfo.receiverName,orderObj.headerInfo.purchaseOrgId )">搜索</button>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>手机号：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="receiverPhone" class="form-control"
                            ng-model="orderObj.headerInfo.receiverPhone" required yb-mobile yb-focus maxlength="11">

                        <div class="msg-block"
                            ng-show="orderForm.receiverPhone.$dirty || (orderForm.receiverPhone.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.receiverPhone.$error.required && !orderForm.receiverPhone.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                            <div class="error-msg"
                                ng-show="orderForm.receiverPhone.$error.mobile && !orderForm.receiverPhone.focused">
                                <div class="msg-triangle"></div>
                                手机号格式错误
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>收货地址：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="receiverAddress" class="form-control"
                            ng-model="orderObj.headerInfo.receiverAddress" required yb-focus maxlength="200">

                        <div class="msg-block"
                            ng-show="orderForm.receiverAddress.$dirty || (orderForm.receiverAddress.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.receiverAddress.$error.required && !orderForm.receiverAddress.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">传真：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="receiverFax" class="form-control"
                            ng-model="orderObj.headerInfo.receiverFax" maxlength="20" yb-tel yb-focus>

                        <div class="msg-block"
                            ng-show="orderForm.receiverFax.$dirty || (orderForm.receiverFax.$invalid && submitted)">
                            <div class="error-msg"
                                ng-show="orderForm.receiverFax.$error.tel && !orderForm.receiverFax.focused">
                                <div class="msg-triangle"></div>
                                传真格式错误
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="orderObj.headerInfo.note"
                            maxlength="200">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">国家和地区：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="orderObj.headerInfo.country"
                            maxlength="50">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">车型：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="orderObj.headerInfo.prodType"
                            maxlength="50">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">车号：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control"
                            ng-model="orderObj.headerInfo.machineNumber" maxlength="50">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">CRM单据号：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="crmOrder" class="form-control" ng-model="orderObj.headerInfo.crmOrder"
                            maxlength="50">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">服务人员：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="serviceName" class="form-control"
                            ng-model="orderObj.headerInfo.serviceName" maxlength="50">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="!!isNJ">
                  <label class="col-xs-4 control-label max-w-100"><span translate>服务类型</span>：</label>
                  <div class="col-xs-8 wrapper-none">
                      <div dealer-dictionary-selector ng-model="orderObj.headerInfo.serviceType" sel-key="Service_Type">
                          <input type="text" class="form-control light-bg" ng-model="orderObj.headerInfo.serviceType" translate-attr-placeholder="请选择" readonly yb-focus>
                      </div>
                  </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                  <label class="col-xs-4 control-label max-w-100">服务人员电话：</label>
                  <div class="col-xs-8 wrapper-none">
                      <input type="text" name="serviceNo" class="form-control"
                          ng-model="orderObj.headerInfo.servicePhone" maxlength="50">
                  </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">服务网点：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="serviceSite" class="form-control"
                            ng-model="orderObj.headerInfo.serviceSite" maxlength="50">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">服务信息单号：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="serviceNo" class="form-control"
                            ng-model="orderObj.headerInfo.serviceNo" maxlength="50">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">是否返厂：</label>
                    <label class="col-xs-5 control-label p-l-n text-left">
                        <input type="radio" class="m-r-md pull-left" yb-radio ng-model="orderObj.headerInfo.isReturn"
                            value="'是'" yb-radio-name="是">
                        <input type="radio" class="m-r-md pull-left" yb-radio ng-model="orderObj.headerInfo.isReturn"
                            value="'否'" yb-radio-name="否">
                    </label>
                </div>
                <!-- 文件上传 -->
                <div class="form-group col-xs-3 m-b-sm" ng-if="isKJ">
                    <label class="col-xs-4 control-label max-w-100">文件上传：</label>
                    <div class="col-xs-8">
                      <button type="button" class="btn btn-primary" style="line-height: 1;" ng-click="openFileUploader()">上传</button>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="isNJ">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>预计发货时间：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="planDeliveryReceiptTime" class="form-control date-picker cursor-pointer"
                               ng-model="orderObj.headerInfo.planDeliveryReceiptTime"
                               datepicker-popup="{{'yyyy-MM-dd HH:mm'}}" ng-click="showDatepicker = !showDatepicker"
                               is-open="showDatepicker" close-text="关闭" readonly required>
                        <div class="msg-block"
                             ng-show="orderForm.planDeliveryReceiptTime.$dirty || (orderForm.planDeliveryReceiptTime.$invalid && submitted)">
                            <div class="error-msg"
                                 ng-if="orderForm.planDeliveryReceiptTime.$error.required && !orderForm.planDeliveryReceiptTime.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="isXF">
                    <label class="col-xs-4 control-label max-w-100">CRM发货单号：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="crmDeliveryNo" ng-disabled="orderObj.headerInfo.id" class="form-control" ng-model="orderObj.headerInfo.crmDeliveryNo"
                               maxlength="50">
                    </div>
                </div>
            </form>
            <div class="row wrapper-y-xs">
                <div class="col-xs-12 operate-bar font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="selMateriel($event)" ng-disabled="orderObj.headerInfo.sourceType == 1">选择零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="importMateriel()" ng-disabled="orderObj.headerInfo.sourceType == 1">导入零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="batchDelMateriel()" ng-disabled="orderObj.headerInfo.sourceType == 1">批量删除</button>
                </div>
            </div>
            <div materiel-selector show-toolbar="toolbarConfig.showMateriel" selected-list="orderObj.detailList"></div>
            <div class="main-area d-b-60" style="top: 390px;">
                <div yb-table-fixed class="table-fixed-wrap" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="400">
                            <thead>
                                <tr>
                                    <th width="40" class="th-check text-center">
                                        <div yb-check-box yb-checked="markInfo.allCheckedMaterial" yb-click="selectAll(orderObj.detailList, 'Material')"></div>
                                    </th>
                                    <th width="60" class="text-center">
                                        操作
                                    </th>
                                    <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" style="left:400px;">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed" width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="orderObj.detailList.length > 0">
                        <table class="table-fixed border-none" width="400">
                            <tbody>
                                <tr ng-repeat="item in orderObj.detailList track by $index">
                                    <td width="40" class="text-center">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingle(item, orderObj.detailList, 'Material')"></div>
                                    </td>
                                    <td width="60">
                                        <button type="button" class="btn btn-operate" ng-click="delMateriel(item, $index)">删除</button>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.detailList.length > 0" style="left:400px;">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in orderObj.detailList track by $index">
                                    <td ng-repeat="itemCol in materielTableConfig.tableCol track by $index" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        width="{{itemCol.width}}">
                                        <div ng-if="!itemCol.needInput">
                                            <div ng-if="!!itemCol.clickFn" class="spill-dots" title="{{item[itemCol.dataField]}}">
                                                <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn, itemCol.dataField)">
                                                    {{item[itemCol.dataField]}}
                                                </a>
                                            </div>
                                            <div ng-if="!itemCol.clickFn">
                                                <div ng-if="itemCol.dataField!='warehouseCode'" class="spill-dots" title="{{item[itemCol.dataField]}}">
                                                    {{item[itemCol.dataField]}}
                                                </div>
                                                <div ng-if="itemCol.dataField=='warehouseCode'" style="display:flex;justify-content:space-between;">
                                                    <div class="spill-dots" title="{{item[itemCol.dataField]}}" style="width:90%;">{{item[itemCol.dataField]}}</div>
                                                    <i class="yb-icon ico-close-o cursor-pointer" ng-if="item[itemCol.dataField]" title="删除" ng-click="clearWarehouseAndArea(item)"></i>
                                                </div>
                                            </div>
                                        </div>
                                        <div ng-if="itemCol.needInput" class="td-edit pos-r" ng-switch="itemCol.dataField">
                                            <div ng-switch-when="purchaseQty">
                                                <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                                    yb-number-input max="99999.999" disable-decimal="false" decimal-places="3" maxlength="9"
                                                    ng-change="countTotal(item,'purchaseQty')"
                                                    ng-focus="showErrTip(item,'purchaseQty')" ng-blur="hideErrTip(item,'purchaseQty')"
                                                    ng-class="{'error':item.purchaseQtyErr||item.purchaseQtyShowErr}">
                                                <div class="pos-a tool-tips" ng-if="!!item.purchaseQtyShowErr">
                                                    <i class="triangle"></i>
                                                    <div class="msg">申请数量不能为空和0</div>
                                                </div>
                                            </div>
                                            <div ng-switch-when="price">
                                                <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                                    yb-number-input max="99999.999" disable-decimal="false" decimal-places="3" maxlength="9"
                                                    ng-focus="showErrTip(item,'price')" ng-blur="hideErrTip(item,'price')"
                                                    ng-change="countTotal(item,'price')"
                                                    ng-class="{'error':item.priceErr||item.priceShowErr}">
                                                <div class="pos-a tool-tips" ng-if="!!item.priceShowErr">
                                                    <i class="triangle"></i>
                                                    <div class="msg">参考单价不能为空和0</div>
                                                </div>
                                            </div>
                                            <div ng-switch-when="transferAmount">
                                                <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                                    yb-number-input max="99999.999" disable-decimal="false" decimal-places="3" maxlength="9"
                                                    ng-disabled="item[itemCol.dataField]==null"
                                                    ng-change="checkTransferAmount(item,'transferAmount')"
                                                    ng-focus="showErrTip(item,'transferAmount')" ng-blur="hideErrTip(item,'transferAmount')"
                                                    ng-class="{'error':item.transferAmountErr||item.transferAmountExceedErr||item.transferAmountShowErr}">
                                                <div class="pos-a tool-tips" ng-if="!!item.transferAmountShowErr">
                                                    <div ng-if="item.transferAmountErr">
                                                        <i class="triangle"></i>
                                                        <div class="msg">调拨数量不能为空和0</div>
                                                    </div>
                                                    <div ng-if="item.transferAmountExceedErr">
                                                        <i class="triangle"></i>
                                                        <div class="msg">调拨数量不能超过申请数量</div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.detailList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData('save', orderForm.$valid)">保存</button>
                <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData('submit', orderForm.$valid)">提交</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
            </div>
        </div>

        <div tab heading="调整三包申请" active="activeFlag[4]" ng-if="activeFlag[4]">
            <hy-layout>
                <hy-layout-form>
                    <form name="$parent.orderForm" class="m-t-sm form-horizontal form-up-tb border-b clearfix" novalidate>
                        <div class="form-group col-xs-3 m-b-sm" ng-if="!!orderObj.headerInfo.purchaseNo">
                            <label class="col-xs-4 control-label max-w-100">申请单号：</label>
                            <div class="col-xs-8 control-label p-l-n text-left spill-dots"
                                title="{{orderObj.headerInfo.purchaseNo}}">
                                {{orderObj.headerInfo.purchaseNo}}
                            </div>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">接收单位：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.supplierOrgName}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">申请日期：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.applicationDate|YbDate}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">申请人：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.applicationName}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">申请人电话：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.applicationPhone}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.type === 2">
                            <label class="col-xs-4 control-label max-w-100">客户名称：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.customerName || "-"}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">调度员：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.dispatcherName}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">SAP内部订单：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.sapName}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">移动类型：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.sapTypeName}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">发运方式：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.deliveryTypeName || "-"}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">结算方式：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.settleTypeName}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">三包类型：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.guaranteesTypeName}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100"><i>*</i>收货人：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="receiverName" class="form-control"
                                    ng-model="orderObj.headerInfo.receiverName" required yb-focus maxlength="11">
        
                                <div class="msg-block"
                                    ng-show="orderForm.receiverName.$dirty || (orderForm.receiverName.$invalid && submitted)">
                                    <div class="error-msg"
                                        ng-if="orderForm.receiverName.$error.required && !orderForm.receiverName.focused">
                                        <div class="msg-triangle"></div>
                                        必填项，请填写
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100"><i>*</i>手机号：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input type="text" name="receiverPhone" class="form-control"
                                    ng-model="orderObj.headerInfo.receiverPhone" required yb-mobile yb-focus maxlength="11">
        
                                <div class="msg-block"
                                    ng-show="orderForm.receiverPhone.$dirty || (orderForm.receiverPhone.$invalid && submitted)">
                                    <div class="error-msg"
                                        ng-if="orderForm.receiverPhone.$error.required && !orderForm.receiverPhone.focused">
                                        <div class="msg-triangle"></div>
                                        必填项，请填写
                                    </div>
                                    <div class="error-msg"
                                        ng-show="orderForm.receiverPhone.$error.mobile && !orderForm.receiverPhone.focused">
                                        <div class="msg-triangle"></div>
                                        手机号格式错误
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100"><i>*</i>收货地址：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input type="text" name="receiverAddress" class="form-control"
                                    ng-model="orderObj.headerInfo.receiverAddress" required yb-focus maxlength="200">
        
                                <div class="msg-block"
                                    ng-show="orderForm.receiverAddress.$dirty || (orderForm.receiverAddress.$invalid && submitted)">
                                    <div class="error-msg"
                                        ng-if="orderForm.receiverAddress.$error.required && !orderForm.receiverAddress.focused">
                                        <div class="msg-triangle"></div>
                                        必填项，请填写
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">传真：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input type="text" name="receiverFax" class="form-control"
                                    ng-model="orderObj.headerInfo.receiverFax" maxlength="20" yb-tel yb-focus>
        
                                <div class="msg-block"
                                    ng-show="orderForm.receiverFax.$dirty || (orderForm.receiverFax.$invalid && submitted)">
                                    <div class="error-msg"
                                        ng-show="orderForm.receiverFax.$error.tel && !orderForm.receiverFax.focused">
                                        <div class="msg-triangle"></div>
                                        传真格式错误
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">备注：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.note}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm">
                            <label class="col-xs-4 control-label max-w-100">国家和地区：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.country}}
                            </label>
                        </div>
                        <!-- 文件上传 -->
                        <div class="form-group col-xs-3 m-b-sm" ng-if="isKJ">
                            <label class="col-xs-4 control-label max-w-100">文件上传：</label>
                            <div class="col-xs-8">
                            <button type="button" class="btn btn-primary" style="line-height: 1;" ng-click="openFileUploader()">上传</button>
                            </div>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm" ng-if="isNJ">
                            <label class="col-xs-4 control-label max-w-100">预计发货时间：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{(orderObj.headerInfo.planDeliveryReceiptTime|YbDate:'yyyy-MM-dd HH:mm:ss')|| "-"}}
                            </label>
                        </div>
                        <div class="form-group col-xs-3 m-b-sm" ng-if="isXF">
                            <label class="col-xs-4 control-label max-w-100">国家和地区：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{orderObj.headerInfo.crmDeliveryNo}}
                            </label>
                        </div>
                    </form>
                </hy-layout-form>
                <hy-table-operation>
                    <button class="btn btn-operate m-r-sm" ng-click="selMateriel($event)">选择零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="batchDelMateriel()">批量删除</button>
                </hy-table-operation>
                <div materiel-selector show-toolbar="toolbarConfig.showMateriel" selected-list="orderObj.detailList"></div>
                <hy-layout-table-fixed>
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="400">
                            <thead>
                                <tr>
                                    <th width="40" class="th-check text-center">
                                        <div yb-check-box yb-checked="markInfo.allCheckedMaterial"
                                            yb-click="selectAll(orderObj.detailList, 'Material')"></div>
                                    </th>
                                    <th width="60" class="text-center">
                                        操作
                                    </th>
                                    <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" style="left:400px;">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="orderObj.detailList.length > 0">
                        <table class="table-fixed border-none" width="400">
                            <tbody>
                                <tr ng-repeat="item in orderObj.detailList track by $index">
                                    <td width="40" class="text-center">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingle(item, orderObj.detailList, 'Material')"></div>
                                    </td>
                                    <td width="60">
                                        <button ng-disabled="item.status != '0'" type="button" class="btn btn-operate"
                                            ng-click="delMateriel(item, $index)">删除</button>
                                    </td>
                                    <td ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}" class="spill-dots">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.detailList.length > 0" style="left:400px;">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in orderObj.detailList track by $index">
                                    <td ng-repeat="itemCol in materielTableConfig.tableCol track by $index" ng-show="!!itemCol.isShow && !itemCol.isFixed" width="{{itemCol.width}}">
                                        <div class="spill-dots" ng-if="!itemCol.needInput" title="{{item[itemCol.dataField]}}">
                                            <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                                {{item[itemCol.dataField]}}
                                            </a>
                                            <span ng-if="!itemCol.clickFn">
                                                {{item[itemCol.dataField]}}
                                            </span>
                                        </div>
                                        <div ng-if="itemCol.needInput" class="td-edit pos-r">
                                            <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                                yb-number-input max="99999.999" disable-decimal="false" decimal-places="3" maxlength="9"
                                                ng-change="countTotal(item,'purchaseQty')"
                                                ng-focus="showErrTip(item,'purchaseQty')" ng-blur="hideErrTip(item,'purchaseQty')"
                                                ng-class="{'error':item.purchaseQtyErr||item.purchaseQtyShowErr}">
                                            <div class="pos-a tool-tips" ng-if="!!item.purchaseQtyShowErr">
                                                <i class="triangle"></i>
                                                <div class="msg">申请数量不能为空和0</div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.detailList.length === 0">暂时没有数据</div>
                </hy-layout-table-fixed>
                <hy-layout-footer>
                    <button type="button" class="btn btn-default m-r-sm" ng-click="adjustData($parent.orderForm.$valid)">调整</button>
                    <button type="button" class="btn btn-default m-r-sm" ng-click="changeTab(0)">取消</button>
                </hy-layout-footer>
            </hy-layout>
        </div>

        <div tab heading="详情" active="activeFlag[3]" ng-if="activeFlag[3]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.purchaseNo||'-'}}">
                        {{orderObj.headerInfo.purchaseNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">接收单位：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.purchaseNo||'-'}}">
                        {{orderObj.headerInfo.supplierOrgName||'-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请日期：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(orderObj.headerInfo.applicationDate|YbDate:'yyyy-MM-dd HH:mm:ss')||'-'}}">
                        {{(orderObj.headerInfo.applicationDate|YbDate:'yyyy-MM-dd HH:mm:ss') || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.applicationName ||'-'}}">
                        {{orderObj.headerInfo.applicationName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请人电话：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{orderObj.headerInfo.applicationPhone ||'-'}}">
                        {{orderObj.headerInfo.applicationPhone || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">客户名称：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.customerName||'-'}}">
                        {{orderObj.headerInfo.customerName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">调度员：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.dispatcherName||'-'}}">
                        {{orderObj.headerInfo.dispatcherName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">SAP内部订单：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.sapName || '-'}}">
                        {{orderObj.headerInfo.sapName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">移动类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.sapTypeName || '-'}}">
                        {{orderObj.headerInfo.sapTypeName}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">发货方式：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.deliveryTypeName||'-'}}">
                        {{orderObj.headerInfo.deliveryTypeName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">结算方式：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.settleTypeName||'-'}}">
                        {{orderObj.headerInfo.settleTypeName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">三包类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{orderObj.headerInfo.guaranteesTypeName||'-'}}">
                        {{orderObj.headerInfo.guaranteesTypeName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">收货人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.receiverName||'-'}}">
                        {{orderObj.headerInfo.receiverName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">手机号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.receiverPhone||'-'}}">
                        {{orderObj.headerInfo.receiverPhone || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">收货地址：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.receiverAddress||'-'}}">
                        {{orderObj.headerInfo.receiverAddress || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">传真：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.receiverFax||'-'}}">
                        {{orderObj.headerInfo.receiverFax || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.realAuditName || '-'}}">
                        {{orderObj.headerInfo.realAuditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.statusDesc || '-'}}">
                        {{orderObj.headerInfo.statusDesc || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核日期：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(orderObj.headerInfo.realAuditDate|YbDate:'yyyy-MM-dd HH:mm:ss') || '-'}}">
                        {{(orderObj.headerInfo.realAuditDate|YbDate:'yyyy-MM-dd HH:mm:ss') || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.auditNote || '-'}}">
                        {{orderObj.headerInfo.auditNote || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.note||'-'}}">
                        {{orderObj.headerInfo.note || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">国家和地区：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.country||'-'}}">
                        {{orderObj.headerInfo.country || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">车型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.prodType||'-'}}">
                        {{orderObj.headerInfo.prodType || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">车号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.machineNumber||'-'}}">
                        {{orderObj.headerInfo.machineNumber || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">CRM单据号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.crmOrder||'-'}}">
                        {{orderObj.headerInfo.crmOrder || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">服务人员：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.serviceName||'-'}}">
                        {{orderObj.headerInfo.serviceName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">服务人员电话：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.servicePhone||'-'}}">
                        {{orderObj.headerInfo.servicePhone || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">服务网点：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.serviceSite||'-'}}">
                        {{orderObj.headerInfo.serviceSite || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">服务信息单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.serviceNo||'-'}}">
                        {{orderObj.headerInfo.serviceNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="!!isNJ">
                    <label class="col-xs-4 m-b-n text-right max-w-100">服务类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.serviceType||'-'}}">
                        {{orderObj.headerInfo.serviceType || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">是否返厂：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{orderObj.headerInfo.isReturn||'-'}}">
                        {{orderObj.headerInfo.isReturn}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">发运时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{orderObj.headerInfo.deliveryReceiptTime||'-'}}">
                        {{(orderObj.headerInfo.deliveryReceiptTime|YbDate:'yyyy-MM-dd HH:mm:ss')|| "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">序列号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.factoryNumber||'-'}}">
                        {{orderObj.headerInfo.factoryNumber|| "-"}}
                    </div>
                </div>
                <!-- <div class="form-group col-xs-3 m-b-sm">  需求不确认,字段先保留
                    <label class="col-xs-4 m-b-n text-right max-w-100">借件列标记：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.borrowFlag||'-'}}">
                        {{orderObj.headerInfo.borrowFlag|| "-"}}
                    </div>
                </div> -->
                <div class="form-group col-xs-3 m-b-sm" ng-if="isKJ">
                  <label class="col-xs-4 m-b-n text-right max-w-100">文件上传：</label>
                  <div class="col-xs-8 wrapper-none spill-dots">
                    <button type="button" class="btn btn-primary" style="line-height: 1;" ng-disabled="!orderObj.headerInfo.attachFileList || orderObj.headerInfo.attachFileList.length == 0" ng-click="openFileViewer()">查看</button>
                  </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="!!isDL||isZHL">
                    <label class="col-xs-4 m-b-n text-right max-w-100">调拨原因：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.crmTransferReasonDesc||'-'}}">
                        {{orderObj.headerInfo.crmTransferReasonDesc|| "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="!!isDL||isZHL">
                    <label class="col-xs-4 m-b-n text-right max-w-100">零件可发：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(orderObj.headerInfo.materialsCanBeShipped|TrueOrFalse) ||'-'}}">
                        {{(orderObj.headerInfo.materialsCanBeShipped|TrueOrFalse) ||'-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="isNJ">
                    <label class="col-xs-4 m-b-n text-right max-w-100">预计发货时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                         title="{{orderObj.headerInfo.planDeliveryReceiptTime||'-'}}">
                        {{(orderObj.headerInfo.planDeliveryReceiptTime|YbDate:'yyyy-MM-dd HH:mm:ss')|| "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="isXF">
                    <label class="col-xs-4 m-b-n text-right max-w-100">CRM发货单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.crmDeliveryNo||'-'}}">
                        {{orderObj.headerInfo.crmDeliveryNo|| "-"}}
                    </div>
                </div>
            </div>

            <div tabset type="sub-tab">
                <div tab heading="零件信息">
                    <div class="main-area d-b-60" ng-style="{top: isNJ||isKJ||isDL||isZHL ? '340px' : (isXF?'350px':'310px')}">
                        <div yb-table-fixed class="table-fixed-wrap" ele-count="4" scroll-area="right">
                            <div class="th-fixed">
                                <table class="table-fixed border-none" width="{{materielTableConfig.fixedWidth}}">
                                    <thead>
                                        <tr>
                                            <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                                width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                                <div yb-thead-operate ng-model="itemCol"></div>
                                            </th>
                                        </tr>
                                    </thead>
                                </table>
                            </div>
                            <div class="th-scroll-x" ng-style="{'left':materielTableConfig.fixedWidth+'px'}">
                                <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                                    <thead>
                                        <tr>
                                            <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                                width="{{itemCol.width}}">
                                                <div yb-thead-operate ng-model="itemCol"></div>
                                            </th>
                                        </tr>
                                    </thead>
                                </table>
                            </div>
                            <div class="td-scroll-y" ng-show="orderObj.detailList.length > 0">
                                <table class="table-fixed border-none" width="{{materielTableConfig.fixedWidth}}">
                                    <tbody>
                                        <tr ng-repeat="item in orderObj.detailList track by $index">
                                            <td class="spill-dots" ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                                width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                                title="{{item[itemCol.dataField]}}">
                                                <span>{{item[itemCol.dataField]}}</span>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="td-scroll" ng-show="orderObj.detailList.length > 0" ng-style="{'left':materielTableConfig.fixedWidth+'px'}">
                                <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                                    <tbody>
                                        <tr ng-repeat="item in orderObj.detailList track by $index">
                                            <td class="spill-dots"
                                                ng-repeat="itemCol in materielTableConfig.tableCol track by $index" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                                width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                                {{item[itemCol.dataField]}}
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="no-data w-full text-center p-t" ng-show="orderObj.detailList.length === 0">暂时没有数据</div>
                        </div>
                    </div>
                </div>
                <div tab heading="交接信息">
                    <div class="main-area d-b-60" style="max-height:400px;overflow-y:auto;" ng-style="{top: isNJ||isKJ||isDL||isZHL ? '340px' : '310px'}">
                        <table class="table" style="width:unset;">
                            <thead>
                                <tr>
                                    <th width="300"><span>图片</span></th>
                                    <th width="200"><span>上传时间</span></th>
                                    <th width="200"><span>电子签名</span></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in orderObj.headerInfo.threeGuaranteesPurImgVOS track by $index" >
                                    <td>
                                        <span ng-click="viewImage(imgUrl)" ng-repeat="imgUrl in item.img.split(',') track by $index" class="img-container">
                                            <img ng-src="{{imgUrl}}"/>
                                        </span>
                                    </td>
                                    <td>{{item.updatedTime|YbDate:"yyyy-MM-dd HH:mm:ss"}}</td>
                                    <td>
                                        <span ng-click="viewImage(signature)" ng-repeat="signature in item.signImg.split(',') track by $index" class="img-container" style="border: 0px;">
                                            <img ng-src="{{signature}}"/>
                                        </span>
                                    </td>
                                </tr>
                                <tr ng-if="!orderObj.headerInfo.threeGuaranteesPurImgVOS || orderObj.headerInfo.threeGuaranteesPurImgVOS.length == 0">
                                    <td class="text-center" colspan="4"><span>暂时没有数据</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-default" ng-click="cancel()">返回</button>
            </div>
        </div>
    </div>
</div>
<style>
  .service-type .header {
    height: 34px;
  }
</style>
